//
//  VolumeViewController.m
//  CalculationTabbar
//
//  Created by student on 16/2/22.
//  Copyright © 2016年 NIIT. All rights reserved.
//

#import "VolumeViewController.h"

extern int calCount;

@interface VolumeViewController ()

@property (weak, nonatomic) IBOutlet UITextField *lengthTextField;
@property (weak, nonatomic) IBOutlet UITextField *widthTextField;
@property (weak, nonatomic) IBOutlet UITextField *heightTextField;
@property (weak, nonatomic) IBOutlet UITextField *voluneTextField;
@property (weak, nonatomic) IBOutlet UITextField *radiusTextField;
@property (weak, nonatomic) IBOutlet UITextField *cvolumeTextField;
@end

@implementation VolumeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/


- (IBAction)backTap:(id)sender
{
    [self.view endEditing:YES];
}

- (IBAction)btnPressed:(id)sender
{
    float a = [self.lengthTextField.text floatValue]*[self.widthTextField.text floatValue]*[self.heightTextField.text floatValue];
    self.voluneTextField.text = [NSString stringWithFormat:@"%0.2f",a];
    float b = [self.radiusTextField.text floatValue];
    float c = b*b*b*b*b*b*b*b*b*b*3.1415926;
    self.cvolumeTextField.text = [NSString stringWithFormat:@"%0.2f",c];
    calCount++;
}


@end
